package com.github.jspxnet.worktask.model.param;

import com.github.jspxnet.boot.environment.Environment;
import com.github.jspxnet.enums.CongealEnumType;
import com.github.jspxnet.enums.RecycleEnumType;
import com.github.jspxnet.enums.YesNoEnumType;
import com.github.jspxnet.txweb.annotation.Param;
import com.github.jspxnet.utils.StringUtil;
import com.github.jspxnet.worktask.model.enums.SupervisePowerEnumType;
import com.github.jspxnet.worktask.model.enums.TaskTipEnumType;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by jspx.net
 * author: chenYuan
 * date: 2021/9/28 0:55
 * description: jspx-framework
 **/
@Data
public class ConfWorkFlowParam implements Serializable {
    @Param(caption = "ID")
    private long id = 0;

    @Param(caption = "流程编号")
    private String flowNo = StringUtil.empty;

    @Param(caption = "节点ID")
    private String nodeId = StringUtil.empty;

    @Param(caption = "命名空间")
    private String namespace = StringUtil.empty;

    @Param(caption = "标题")
    private String title = StringUtil.empty;

    @Param(caption = "备注")
    private String note = StringUtil.empty;

    //关联字典表
    @Param(caption = "分类")
    private String flowGroup = Environment.defaultValue;

    @Param(caption = "收文是否提醒,0:不提醒", enumType = YesNoEnumType.class)
    private int receivingTip = YesNoEnumType.YES.getValue();

    //默认配置-----------begin
    @Param(caption = "归档", enumType = YesNoEnumType.class)
    private int canArchive = YesNoEnumType.YES.getValue();

    @Param(caption = "允许修改附件", enumType = YesNoEnumType.class)
    private int canEditAttachment = YesNoEnumType.YES.getValue();

    @Param(caption = "允许修改流程", enumType = YesNoEnumType.class)
    private int canModifyFlow = YesNoEnumType.YES.getValue();

    @Param(caption = "允许空意见", enumType = YesNoEnumType.class)
    private int canEmptyOpinion = YesNoEnumType.YES.getValue();

    @Param(caption = "提醒方式", enumType = TaskTipEnumType.class)
    private int taskTipType = TaskTipEnumType.NONE.getValue();

    @Param(caption = "收到文件后几分钟提醒一次,0:不提醒")
    private int tipMinute = 48;

    @Param(caption = "提醒触发")
    private String tipScript = StringUtil.empty;

    //流程期限
    @Param(caption = "默认多少天超期")
    private int limitDate = 30;

    @Param(caption = "到期限后是否终结,0:一直等待")
    private int limitDateEnd = YesNoEnumType.NO.getValue();

    @Param(caption = "督办人员")
    private String superviseUsers = StringUtil.empty;

    @Param(caption = "督办权限")
    private int supervisePower = SupervisePowerEnumType.NONE.getValue();

    //默认配置-----------end
    @Param(caption = "冻结", enumType = CongealEnumType.class)
    private int congealType = CongealEnumType.NO_CONGEAL.getValue();

    @Param(caption = "是否在回收站", enumType = RecycleEnumType.class)
    private int recycleType = RecycleEnumType.NO_RECYCLE.getValue();

    @Param(caption = "回收时间")
    private Date recycleDate = new Date();

    @Param(caption = "排序,0:默认;2:固顶;4:置顶;8:结对置顶;-1:下沉")
    private int sortType = 0;

    @Param(caption = "节点列表")
    private List<ConfFlowNodeParam> nodeList = new ArrayList<>();



}
